package com.rest;

import java.util.Collections;
import java.util.List;

public class ApiServices implements Comparable<ApiServices> {

	private String api;

	private List<String> services;

	public ApiServices(String api, List<String> services) {
		this.api = api;
		setServices(services);
	}

	public String getApi() {
		return api;
	}

	public void setApi(String api) {
		this.api = api;
	}

	public List<String> getServices() {
		return services;
	}

	public void setServices(List<String> services) {
		Collections.sort(services);
		this.services = services;
	}

	@Override
	public int compareTo(ApiServices apiServices) {
		return this.api.compareTo(apiServices.api);
	}
}
